package com.css.zfzx.sjcj.modules.hddcGeoGeomorphySvyPoint.repository;

import com.css.zfzx.sjcj.modules.hddcGeoGeomorphySvyPoint.repository.entity.HddcGeogeomorphysvypointEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author lihelei
 * @date 2020-11-26
 */
public interface HddcGeogeomorphysvypointRepository extends JpaRepository<HddcGeogeomorphysvypointEntity, String> {

    @Query(nativeQuery = true, value = "select * from hddc_geogeomorphysvypoint where is_valid !=0 and project_name in :projectIds")
    List<HddcGeogeomorphysvypointEntity> queryHddcGeogeomorphysvypointsByProjectId(List<String> projectIds);

    @Query(nativeQuery = true, value = "select * from hddc_geogeomorphysvypoint where is_valid !=0 and task_name in :taskIds")
    List<HddcGeogeomorphysvypointEntity> queryHddcGeogeomorphysvypointsByTaskId(List<String> taskIds);
}
